package com.cc.springbootthreadpooldemo.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class TestService {
    @Async("asyncTaskExecutor")
    public void test() throws InterruptedException {
        log.info("线程名称：{}，开始处理。。。", Thread.currentThread().getName());
        Thread.sleep(1000*5);
        log.info("线程名称：{}，处理完成。。。", Thread.currentThread().getName());
    }
}
